<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>eidt</title>
</head>
<body>
	<?php
		$id = $_GET['id'];
		include('conn.php');
		$resourse = mysql_query("select * from data where id=$id",$conn); 
		//var_dump($resourse);
		//$resourse是结果集，不能直接用，需要用下面语句拿出
		$data = mysql_fetch_assoc($resourse);
		//var_dump($data);
	?>
	
	<h2>吴松的留言板</h2>
	<form method="post" action="edit_save.php">
	<input type="hidden" name="id" value="<?php echo $data["id"]?>">
	<table>
		<tr>
			<td>姓名</td>
			<td><input type="text" name="name" value="<?php echo $data["name"]?>" style="width:400px; height:20px; "></td>
		</tr>
		<tr>
			<td>内容</td>
			<td><textarea style=" width:400px; " rows="5" name="write"><?php echo $data["write"]?></textarea></td>
		</tr>
		<tr>
			<td></td>
			<td><input type="submit" /></td>
		</tr>
	</table>
	</form>
	</body>
</html>